<style>
	.btn.btn-success {
		background: #6499fa;
	}
</style>
<div class='fui-page fui-page-current'>
    <div class="fui-header">
		<div class="fui-header-left">
			<a class="back" ng-click="goback()"></a>
		</div>
		<div class="title">确认支付</div> 
		<div class="fui-header-right">&nbsp;</div>
    </div>
    <div class="fui-content">
		<div style="padding:0.5rem">
		<div class="tips tips-yellow" style="margin:0">
			<i class="fa fa-bullhorn"></i> [<red>温馨提示</red>]：{{pagedata.tips}}
		</div>
		<div class='fui-cell-group'>
			<div class="fui-cell">
                <div class="fui-cell-label">商户订单号</div>
                <div class="fui-cell-info">{{pagedata.item.reqsn}}</div>
            </div>
			<div class="fui-cell">
                <div class="fui-cell-label">协议编号</div>
                <div class="fui-cell-info">{{pagedata.item.agreeid}}</div>
            </div>
			<div class="fui-cell">
                <div class="fui-cell-label">订单金额</div>
                <div class="fui-cell-info">￥{{pagedata.item.fee}}</div>
            </div>
			<div class="fui-cell">
                <div class="fui-cell-label">订单内容</div>
                <div class="fui-cell-info">{{pagedata.item.subject}}</div>
            </div>
			<div class="fui-cell">
                <div class="fui-cell-label">短信验证码</div>
                <div class="fui-cell-info"><input type="text" class="fui-input" placeholder="短信验证码" ng-model="pagedata.item.smscode"/></div>
				<div class="fui-cell-remark noremark"><a class="btn btn-default btn-default-o btn-sm" ng-click="pagedata.getsmspost()" id="sms_code">重新获取验证码</a></div>
            </div>
		</div>
		</div>
		<a href="javascript:;" class='btn btn-success block' style="line-height: 2.6;" ng-click="pagedata.checkpost()">支付确认</a>
		<a ng-if="pagedata.item.ispay==1" href="javascript:;" class='btn btn-gray block' style="line-height: 2.6;">您已完成支付</a>
	</div>
</div>
<script>
scope.pagedata.getsmspost=function(){
	scope.post_json('jy_allinpay/pay/getsmspost/',scope.pagedata.item,function(res){
		console.log(res);
		if(res.thpinfo){
			scope.pagedata.item.thpinfo=res.thpinfo;
			scope.$evalAsync();
		}
	});
}
scope.pagedata.checkpost=function(){
	scope.post_json('jy_allinpay/pay/checkpost/',scope.pagedata.item,function(res){
		console.log(res);
		if(res.thpinfo){
			scope.pagedata.item.thpinfo=res.thpinfo;
			scope.$evalAsync();
		}
	});
}
</script>